package com.itheima.create;

public class ArrayDemo3 {
    public static void main(String[] args) {
        // 目标：掌握动态初始化数组的写法。
        int[] scores = new int[6];  // [0, 0, 0, 0, 0, 0]
        //                              0  1  2  3  4  5
        System.out.println(scores[3]);

        scores[0] = 98;
        scores[1] = 78;
        scores[2] = 88;
        scores[3] = 98;
        scores[4] = 100;
        scores[5] = 99;

        System.out.println(scores[4]);

        System.out.println("--------------数组元素默认值的研究--------------------");
        long[] arr = new long[100];
        System.out.println(arr[99]);

        char[] arr1 = new char[10];
        System.out.println((int)arr1[9]);

        double[] arr2 = new double[200];
        System.out.println(arr2[199]);

        boolean[] arr3 = new boolean[200];
        System.out.println(arr3[199]);

        String[] names = new String[300];
        System.out.println(names[150]);

    }
}
